package com.test.jdbc.driver;

import com.test.jdbc.connection.OracleConnectionImpl;
import com.test.jdbc.connection.RgsConnection;
import com.test.jdbc.manager.DriverManager;

/**
 * @author RenGaoshuai
 * @date 2024/6/3 10:55
 * @description
 */
public class OracleDriver implements Driver{

    /**
     * 注册到Drivermanager的集合中
     */
    static{
        DriverManager.register(new OracleDriver());
    }

    @Override
    public RgsConnection getConnection(String url) {
        if (url.startsWith("jdbc:oracle")) {
            return new OracleConnectionImpl();

        }
        return null;
    }
}
